package com.guomao;

public class StringBuilderDemo {

    public static void main(String[] args) {


        StringBuilder sb = new StringBuilder();
        //StringBuilder的append方法返回的是同一个对象
//        StringBuilder sb1 = sb.append(100);
//        StringBuilder sb2 = sb1.append(99.89);
//        System.out.println(sb == sb1);
//        String string = sb.append(100).append(13.69).append('a').append(true).append("hello").toString();
        String string1 = sb.append(100).append(13.69).append('a').append(true).append("hello").reverse().toString();
        //StringBuilder 和String是两种引用类型

        System.out.println(string1);


        StringBuffer sf = new StringBuffer();
    }
}
